<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>关联数组</title>
	</head>
	<body>
		<script>
			var obj = {
				name
			}
			console.log(obj[name]=1)
			console.log(obj)
			var obj1 = {
				a:'x',
				b:'y'
			}
			//遍历obj1 可以获取obj1的 key：ele  value：obj[ele]
			for(ele in obj1){
				obj[ele] = obj1[ele]
			}
			console.log(obj)
		</script>
	</body>
</html>
